package com.muyu.controller;

import com.muyu.entity.CompanyEntity;
import com.muyu.group.UpdateGroup;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ClassName: CompanyController
 * @Author: Zirun.Xin
 * @Date: 2025/4/7 下午5:23
 * @Version: 1.0
 * @Description: 公司控制层
 */
@Slf4j
@RestController
@RequestMapping(value = "/api/v1/company")
public class CompanyController {

    /**
     * 修改公司
     * @param companyEntity 公司实体
     * @param bindingResult 绑定结果集
     * @return 响应结果集
     */
    @PostMapping(value = "/update")
    public Map<String, String> updateCompany(@Validated(UpdateGroup.class) @RequestBody CompanyEntity companyEntity,
                                             BindingResult bindingResult) {
        log.info("{}", companyEntity);
        return null;
    }
}
